<cfset BASE = CreateObject("component", "cfc.base") / >
<cfset statusQueries = CreateObject("component", "cfc.statusQueries") />
<cfset baseQueries = CreateObject("component", "cfc.queries") />


<cfdocument format="pdf" orientation="Portrait" filename="Temp/FinanceCover.pdf" overwrite="yes">


<cfif Session.bolAuth EQ True and (Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.FINANCE)>   

    <cfset qryGetStep5Waiting = statusQueries.funcGetSCFStepWaiting(6) />    

	<cfoutput>	
        <cfset intX = 1>
        <cfset GAP = 15>
        <cfif qryGetStep5Waiting.recordcount GT 0>
        
            <cfloop query="qryGetStep5Waiting">     
                <cfset intStepID = ID>   
                <cfset strEmpName =  Name>     
                            
                <cfquery name="qryGetEmpInfo" datasource="EPAR">
                    scf_GetEmpInfoByStep #intStepID#
                </cfquery>
                <cfloop query="qryGetEmpInfo">
                    <cfset intEmpID = ID>
                    <cfif PreferredName EQ ''>
                        <cfset strEmpName = trim(Last & ', ' & First & ' ' & Middle)>
                    <cfelse>
                        <cfset strEmpName = trim(Last & ', ' & First & ' (' & PreferredName & ') ' & Middle )>
                    </cfif>
                    <cfset strCostCode = CostCode>
               	 	<cfset intPosID = PositionID>  
                </cfloop>                     
                
                <cfquery name="qryGetPositionInfo" datasource="#Session.DataSourceWFCDB#">
                    Select PositionIDNo, PositionCode, PositionCodeDescription
                    From tPosition_Codes 
                    Where PositionIdNo = #intPosID#
                </cfquery>
                <cfset strPos = qryGetPositionInfo.PositionCodeDescription>
    	
               <div id="report">
                        <table width= 100%>
                        	<tr>
                            	<td width = 15 nowrap="nowrap">
                                	<h1>Employee:</h1>
                                </td>
                            	<td width = 25>&nbsp;</td>
                                <td>
                                	<h2>#strEmpName#</h2>
                                </td>
                            </tr>
                        	<tr>
                            	<td nowrap="nowrap">
                                	<h1>Cost Code:</h1>
                                </td>
                            	<td>&nbsp;</td>
                                <td>
                                	<h2>#strCostCode#</h2>
                                </td>
                            </tr>
                        	<tr>
                            	<td>&nbsp;</td>
                            </tr>
                        	<tr>
                            	<td>&nbsp;</td>
                            </tr>
                        	<tr>
                            	<td>&nbsp;</td>
                            </tr>
                        	<tr>
                            	<td>&nbsp;</td>
                            </tr>
                        	<tr>
                            	<td>&nbsp;</td>
                            </tr>
                        	<tr>
                            	<td>&nbsp;</td>
                            </tr>
                        	<tr>
                            	<td colspan="3">
                                	<h1>Finance Approval</h1>
                                </td>
                            </tr>
                        	<tr>
                            	<td>&nbsp;</td>
                            </tr>
                        	<tr>
                            	<td>&nbsp;</td>
                            </tr>
                        	<tr>
                            	<td colspan="3">
                                	<h2>Signature:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    Date:
                                    </h2>
                                </td>
                            </tr>
                        </table>    
                
                    </div>
            
                <cfdocumentitem type = "pagebreak"/>
        
        
        	</cfloop>
                
        <cfelse>
            <span class="error">At the present time, there are not any employees staged for entry to Fundware.</span>
        </cfif>
    </cfoutput>
    
<cfelse>
	<cfinclude template="Denied.cfm">
    
</cfif>


</cfdocument>